from zope.interface import Interface


class IReadTrackbackInManager(Interface):
    """Management of incoming trackback pings for an object.
    """

    def getAcceptedTrackbacks():
        """Return a tuple of accepted ITrackback instances.
        """

    def getDubiousTrackbacks(obj):
        """Return a tuple of dubious ITrackback instances.
        """


class IWriteTrackbackInManager(Interface):
    """Management of incoming trackback pings for an object.
    """

    def store(trackback):
        """Store the ITrackback object.
        """

    def delete(id):
        """Delete the trackback with `id'.
        """

    def process(trackback, request):
        """Process `trackback' with the registered plugins.
        """


class ITrackbackInPluginManager(Interface):
    """
    """

    def getPlugins():
        """Return a tuple of all plugins.
        """

    def getPluginsFor(trackback, request):
        """Return a tuple of plugins that should be executed for the
        trackback.
        """


class ITrackbackInManager(IReadTrackbackInManager, IWriteTrackbackInManager):
    """Management of incoming trackback pings for an object.
    """



class IGlobalTrackbackInManager(IWriteTrackbackInManager,
                                ITrackbackInPluginManager):
    """
    """

    def getAcceptedTrackbacksFor(obj):
        """Return a tuple of accepted ITrackback instances associated with
        `obj'.
        """

    def getDubiousTrackbacksFor(obj):
        """Return a tuple of dubious ITrackback instances associated with `obj'.
        """
